package starter.stepdefinitions.orangehrmlive;

/**
 * @ClassName MenuPageStepdefs
 * @Date 2024/11/2 12:03 53
 * @Author Jack Chen
 * @Description serenity-cucumber-auto-project-jack
 * @Version 1.0
 */
import io.cucumber.java.en.Then;
import io.cucumber.java.en.When;
import net.serenitybdd.annotations.Steps;
import starter.actions.orangehrmlive.NavbarPageSteps;

public class NavbarPageStepdefs {

    @Steps
    NavbarPageSteps navbarPageSteps;

    @Then("module search box shown in HRM menu bar")
    public void module_search_box_shown_inHRM_menubar() {
        navbarPageSteps.verifySearchBoxShownInHRMMenubar();
    }

    @When("user input {} into menu search box")
    public void userInputIntoMenuSearchBox(String keyword) {
        navbarPageSteps.inputContextIntoMenuSearchBox(keyword);
    }

    @Then("the search result contains {} menu")
    public void theSearchResultContainsMenu(String menuName) {
        navbarPageSteps.checkSearchResultContainsMenu(menuName);
    }

    @Then("{} menu shown in HRM menu bar")
    public void shownInHRMMenuBar(String menuName) {
        navbarPageSteps.checkMenuDisplayed(menuName);
    }

    @When("user tab the {}")
    public void userTabThe(String menuName) {
        navbarPageSteps.userClickMenu(menuName);
    }

    @Then("the {} shows correctly")
    public void theShowsCorrectly(String pageName) {
        navbarPageSteps.checkPageDisplayed(pageName);
    }
}
